﻿#test.py  

class entryExit2(object): 
    def __init__(self, f):
        print "inside myDecorator.__init__()"
        self.f = f 
    def __call__(self):
        print "Entering", self.f.__name__
        tmp=self.f()
        print "Exited", self.f.__name__
        return tmp

def entryExit(f):
    def new_f():
        print "Entering", f.__name__
        f()
        print "Exited", f.__name__
    return new_f

def entryExit3(f):
    def new_f(*args):
        print "Entering", f.__name__
        tmp=f(*args)
        print "Exited", f.__name__
        return tmp
    return new_f

def entryExit4(f):
    def new_f(a,b):
        print "Entering", f.__name__
        tmp=f(a,b)
        print "Exited", f.__name__
        return tmp
    return new_f

#@entryExit
def HelloWorld():  
    print "Hello World"  
#@entryExit2
def HelloWorld2():  
    return "Hello World" 

@entryExit4
def add(a, b):  
    return a+b  

def TestDict(dict):  
    print dict  
    dict["Age"] = 17  
    return dict  
class Person:  
    def greet(self, greetStr):  
        print greetStr  


class Person2():  
    Data=100;
    pass
#print add(5,7)  
#a = raw_input("Enter To Continue...")  

a=10